<?php
/**
 * 
 * @author	ronnie  (comdeng@gmail.com)
 * @link		http://fillphp.com/
 * @date		2014-5-1 上午2:20:11
 * @file		Hook.php
 * @description 
 */
namespace fillphp\hook;

const HOOK_REQUEST_ROUTE = '\hook\request\route';
const HOOK_REQUEST_INPUT = '\hook\request\input';
class Hook
{
	private static $hooks;
	/**
	 * 设置filter
	 * @param string $key
	 * @param string | array $filter
	 */
	static function set($key, $filter)
	{
		self::$hooks[$key][] = $filter;
	}

	/**
	 * 获取filter
	 * @param string $key
	 * @return array
	 */
	static function gets($key)
	{
		if (!isset(self::$hooks[$key])) {
			return array();
		}
		return self::$hooks[$key];
	}
}
